package app;


import com.opensymphony.xwork2.ActionSupport;
import javax.sql.DataSource;
import org.springframework.jdbc.datasource.DriverManagerDataSource;


public class RunReportAction extends ActionSupport {


  private int age;
  private String dvDelimiter;
  private DataSource dvDataSource;


  public void setAge(final int inAge) {
    age = inAge;
  }
  public int getAge() {
    return age;
  }
  public void setDvDelimiter(final String inDvDelimiter) {
    dvDelimiter = inDvDelimiter;
  }
  public String getDvDelimiter() {
    return dvDelimiter;
  }
  public DataSource getDvDataSource() {
    return dvDataSource;
  }


  public String execute() throws Exception {
    System.out.println("age = " + age);
    System.out.println("dvDelimiter = " + dvDelimiter);
    return SUCCESS;
  }


  public String execute10() throws Exception {
    System.out.println("age = " + age);
    dvDataSource = new DriverManagerDataSource();
      ((DriverManagerDataSource)dvDataSource).setDriverClassName(
        "org.apache.derby.jdbc.EmbeddedDriver");
      ((DriverManagerDataSource)dvDataSource).setUrl(
        "jdbc:derby:dvplugin");
      ((DriverManagerDataSource)dvDataSource).setUsername("");
      ((DriverManagerDataSource)dvDataSource).setPassword("");
    return SUCCESS;
  }


}
